package com.youth.youthservice;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.EnableAspectJAutoProxy;

@EnableFeignClients     //feign远程调用，在调用端的启动类上加上注解
@EnableDiscoveryClient   //nacos注册
@SpringBootApplication
@EnableAspectJAutoProxy(proxyTargetClass = true,exposeProxy = true)  //开启代理对象暴露
/*扫描指定路径下的类到spring容器里面,如果不添加可能会扫描不到导入的其他模块（与启动类不在同一层级或以下）*/
@ComponentScan(basePackages = {"com.youth"})
@MapperScan("com.youth.youthservice.mapper")
/*@MapperScan("路径") 可以替换dao层，在每个interface上面添加@Mapper注解 */
public class YouthApplication {

    public static void main(String[] args) {
        SpringApplication.run(YouthApplication.class, args);
    }

}
